package com.syq.utils;

import java.lang.reflect.Array;
import java.util.List;

public class CollectionUtils {
    public  static  <T> T[] convertArrayFromList(List<T> ts,Class<T> tClass){
        T[] tArray =  (T[]) Array.newInstance(tClass, ts.size());
        for (int i=0;i<ts.size();i++){
            tArray[i] = ts.get(i);
        }
        return tArray;
    }
}
